{\rtf1\ansi\ansicpg1252\cocoartf949
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh10640\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural

\f0\b\fs24 \cf0 NSImage+QuickLook\
By Matt Gemmell <http://mattgemmell.com/>
\b0 \
\
This is a category on NSImage which lets you get an image containing a Quick Look preview of the content of a given file. If no Quick Look preview is available, it will instead return the file's Finder icon (this is what the Quick Look panel does). It consists of only one method:\
\
\
+ (NSImage *)imageWithPreviewOfFileAtPath:(NSString *)path ofSize:(NSSize)size asIcon:(BOOL)icon\
\
\
Path should be a full file-system path (i.e. you should do -stringByExpandingTildeInPath etc before passing the path to this method).\
\
Size is an NSSize giving the maximum size of the preview image, obviously.\
\
The last parameter is a BOOL indicating whether the preview should be rendered as an icon, i.e. with a document border, drop-shadow, page-curl and file-type/extension superimposed. Pass YES to get Finder-style icon previews, or pass NO to get previews like those in the Quick Look panel.\
\
\

\b How to use
\b0 \
\
Simply copy the two files into your project, and make sure your active target imports the QuickLook framework.\
\
Enjoy!\
}